//获取安全高度	
const SYSYTEM_INFO = uni.getSystemInfoSync();
export const getStatusBarHeight = ()=> SYSYTEM_INFO.statusBarHeight || 15;


//获取小程序胶囊按钮高度
export const getTitleBarHeight = ()=>{
	
	if(uni.getMenuButtonBoundingClientRect){
		
		let {top,height} = uni.getMenuButtonBoundingClientRect();
		return (top - getStatusBarHeight()) * 2 + height;
		
	}else{
		return 40;
	}
	
}

export const getNavBarHeight = ()=> getStatusBarHeight()+getTitleBarHeight();